home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Apple WWDC 1996
/
WWDC96_1996 (CD).toast
/
Technology Materials
/
MacOS 8 Resources
/
Developer Tools
/
Mac OS 8 Interfaces & Libraries
/
Interfaces
/
CIncludes
/
Timer.h
< prev
next >
Wrap
C/C++ Source or Header
|
1996-05-01
|
3KB
|
142 lines
/*
File: Timer.h
Contains: Time Manager interfaces.
Version: Technology: System 7.5
Release: Universal Interfaces 3.0d3 on Copland DR1
Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
Bugs?: If you find a problem with this file, send the file and version
information (from above) and the problem description to:
Internet: apple.bugs@applelink.apple.com
AppleLink: APPLE.BUGS
*/
#ifndef __TIMER__
#define __TIMER__
#ifndef __CONDITIONALMACROS__
#include <ConditionalMacros.h>
#endif
#ifndef __TYPES__
#include <Types.h>
#endif
#ifndef __OSUTILS__
#include <OSUtils.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
#if PRAGMA_IMPORT_SUPPORTED
#pragma import on
#endif
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=mac68k
#endif
#if FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED
enum {
/* high bit of qType is set if task is active */
kTMTaskActive = (1L << 15)
};
/*
This ProcPtr uses register based parameters on the 68k and cannot
be written in or called from a high-level language without the help of
mixed mode or assembly glue.
typedef pascal void (*TimerProcPtr)(TMTaskPtr tmTaskPtr);
*/
#if GENERATINGCFM
typedef UniversalProcPtr TimerUPP;
#else
typedef Register68kProcPtr TimerUPP;
#endif
struct TMTask {
QElemPtr qLink;
short qType;
TimerUPP tmAddr;
long tmCount;
long tmWakeUp;
long tmReserved;
};
typedef struct TMTask TMTask;
typedef TMTask *TMTaskPtr;
#if GENERATING68K && !GENERATINGCFM
#pragma parameter InsTime(__A0)
#endif
extern pascal void InsTime(QElemPtr tmTaskPtr)
ONEWORDINLINE(0xA058);
#if GENERATING68K && !GENERATINGCFM
#pragma parameter InsXTime(__A0)
#endif
extern pascal void InsXTime(QElemPtr tmTaskPtr)
ONEWORDINLINE(0xA458);
#if GENERATING68K && !GENERATINGCFM
#pragma parameter PrimeTime(__A0, __D0)
#endif
extern pascal void PrimeTime(QElemPtr tmTaskPtr, long count)
ONEWORDINLINE(0xA05A);
#if GENERATING68K && !GENERATINGCFM
#pragma parameter RmvTime(__A0)
#endif
extern pascal void RmvTime(QElemPtr tmTaskPtr)
ONEWORDINLINE(0xA059);
extern pascal void Microseconds(UnsignedWide *microTickCount)
FOURWORDINLINE(0xA193, 0x225F, 0x22C8, 0x2280);
enum {
uppTimerProcInfo = kRegisterBased
| REGISTER_ROUTINE_PARAMETER(1, kRegisterA1, SIZE_CODE(sizeof(TMTaskPtr)))
};
#if GENERATINGCFM
#define NewTimerProc(userRoutine) \
(TimerUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppTimerProcInfo, GetCurrentArchitecture())
#else
#define NewTimerProc(userRoutine) \
((TimerUPP) (userRoutine))
#endif
#if GENERATINGCFM
#define CallTimerProc(userRoutine, tmTaskPtr) \
CallUniversalProc((UniversalProcPtr)(userRoutine), uppTimerProcInfo, (tmTaskPtr))
#else
/* (*TimerUPP) cannot be called from a high-level language without the Mixed Mode Manager */
#endif
#endif
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=reset
#endif
#if PRAGMA_IMPORT_SUPPORTED
#pragma import off
#endif
#ifdef __cplusplus
}
#endif
#endif /* __TIMER__ */